package oop2;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr2 {
    public static void main(String[] args) {
        Student s[]=new Student[10];
        for (int i = 0; i < s.length; i++) {
            s[i]=new Student();
            s[i].name="刘"+i;
            s[i].java= (int) (Math.random()*100);
            s[i].c=(int) (Math.random()*100);
        }

        for (Student s1:s){
            s1.show();
        }
        Teacher t=new Teacher();
        int avg = t.calcJAvaAvg(s);
        System.out.println("这几个人的java平均分是："+avg);
    }
}
